<?php

class MySQLConfig {

	/* Server Connection */
	private $hostname		= null;
	private $login_username		= null;
	private $login_password		= null;

	private $alwaysNewConnection	= false;				/* Neue Verbindung um jeden Preis, set PHP 4.2.0 */
	private $serverClientFlags	= MYSQL_CLIENT_COMPRESS;		/* Server-Client Flags, seit PHP 4.3.0 */

	private $database_name		= null;

	private $tables_prefix		= null;

	private $tables_list		= null;

	/* Klassen interne String Templates */
	private $tableCreation_callback_tpl 		= "create_table_{tablename}_callback";
	private $tableCreation_includeFileExtension 	= "inc.php";

	function __construct( $hostname, $username, $password, $database_name, $tables_prefix ) {
		$this->hostname = $hostname;
		$this->login_username = $username;
		$this->login_password = $password;
		$this->database_name = $database_name;
		$this->tables_prefix = $tables_prefix;
	}

	function registerTable( $tableName, $tableSuffix ) {
		$this->tables_list[$tableName] = $this->getTablesPrefix().$tableSuffix;
	}

	function getTableByName( $tableName ) {
		return $this->tables_list[$tableName];
	}


	function getTableList() {
		return $this->tables_list;
	}

	function getHostName() {
		return $this->hostname;
	}

	function getLoginUserName() {
		return $this->login_username;
	}

	function getLoginPassword() {
		return $this->login_password;
	}

	function getIsAlwaysNewConnection() {
		return $this->alwaysNewConnection;
	}

	function getServerClientFlags() {
		return $this->serverClientFlags;
	}

	function getDatabaseName() {
		return $this->database_name;
	}

	function getTablesPrefix() {
		return $this->tables_prefix;
	}

	

}

?>